package com.homework.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单详情表
 * </p>
 *
 * @author tch
 * @since 2024-11-17
 */
@Getter
@Setter
@TableName("order_detail")
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单详情id 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 商品id
     */
    @TableField("item_id")
    private Long itemId;

    /**
     * 购买数量
     */
    @TableField("num")
    private Integer num;

    /**
     * 商品标题
     */
    @TableField("name")
    private String name;

    /**
     * 商品动态属性键值集
     */
    @TableField("spec")
    private String spec;

    /**
     * 价格,单位：分
     */
    @TableField("price")
    private Integer price;

    /**
     * 商品图片
     */
    @TableField("image")
    private String image;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
}
